
import 'package:get/get.dart';
import 'package:wechat_manager/pages/content/publish/publish_state.dart';

import '../../../network/network_helper.dart';

class PublishController extends GetxController {
  PublishState state = PublishState();

  @override
  void onReady() {
    getBatchPublish();
  }

  void getBatchPublish() {
    var params = {
      "offset": 0,
      "count": 20,
      "no_content": 1
    };
    NetworkHelper.INSTANCE.contentService.getBatchPublish(params).then((res){
      if(res.errcode == null) {
        state.articleItems.value = res.items ?? [];
      }
    });
  }
}